home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / CUGUK / GAMES / C014.ZIP / LARN_SRC.ZIP / HEADER.H < prev    next >
C/C++ Source or Header  |  1993-11-17  |  4KB  |  111 lines

  1. /*  header.h        Larn is copyrighted 1986 by Noah Morgan. */
  2.  
  3. #ifdef MSDOS
  4. #   define LARNHOME ""
  5. #endif
  6.  
  7. #ifndef WIZID
  8. #   define WIZID  1000
  9. #endif
  10.  
  11. #define TRUE 1
  12. #define FALSE 0
  13.  
  14. #ifdef VMS
  15. #define unlink(x)   delete(x)    /* remove a file */
  16. #endif
  17.  
  18. #define SCORENAME   "larn.scr"
  19. #define LOGFNAME    "larn.log"
  20. #define HELPNAME    "larn.hlp"
  21. #define LEVELSNAME  "larn.maz"
  22. #define FORTSNAME   "larn.ftn"
  23. #define PLAYERIDS   "larn.pid"
  24. #define HOLIFILE    "holidays"
  25. #ifdef MSDOS
  26. #   define LARNOPTS "larn.opt"
  27. #   define SAVEFILE "larn.sav"
  28. #   define SWAPFILE "larn.swp"
  29. #   define CKPFILE  "larn.ckp"
  30. #else
  31. # ifdef VMS
  32. #   define LARNOPTS "larn.opt"
  33. #   define SAVEFILE "larn.sav"
  34. #   define CKPFILE  "larn.ckp"
  35. # else
  36. #   define LARNOPTS ".larnopts"
  37. #   define SAVEFILE "Larn.sav"
  38. #   define CKPFILE  "Larn.ckp"
  39. #   define MAIL     /* disable the mail routines for MSDOS */
  40. # endif VMS
  41. #endif MSDOS
  42.  
  43. #define MAXLEVEL 11    /*  max # levels in the dungeon         */
  44. #define MAXVLEVEL 3    /*  max # of levels in the temple of the luran  */
  45. #define MAXX 67
  46. #define MAXY 17
  47.  
  48. #define SCORESIZE 10    /* this is the number of people on a scoreboard max */
  49. #define MAXPLEVEL 100   /* maximum player level allowed        */
  50. #define SPNUM 38        /* maximum number of spells in existance   */
  51. #define TIMELIMIT 30000 /* maximum number of moves before the game is called */
  52. #define TAXRATE 1/20    /* tax rate for the LRS */
  53.  
  54.  
  55. /*  this is the structure that holds the entire dungeon specifications  */
  56. struct cel
  57.     {
  58.     short   hitp;   /*  monster's hit points    */
  59.     char    mitem;  /*  the monster ID          */
  60.     char    item;   /*  the object's ID         */
  61.     short   iarg;   /*  the object's argument   */
  62.     char    know;   /*  have we been here before*/
  63.     };
  64.  
  65. /* this is the structure for maintaining & moving the spheres of annihilation */
  66. struct sphere
  67.     {
  68.     struct sphere *p;   /* pointer to next structure */
  69.     char x,y,lev;       /* location of the sphere */
  70.     char dir;           /* direction sphere is going in */
  71.     char lifetime;      /* duration of the sphere */
  72.     };
  73.  
  74. # ifdef MSDOS
  75. /* Since only 1 level is needed at one time, each level can be swapped
  76.  * to disk if there is not enough memory to allocate it.  Thus, there
  77.  * need only be room for 1 level.  When a level is needed, if it is
  78.  * already in memory, there is nothing to do.  If it isn't, get it from
  79.  * disk after swapping out the oldest level - dgk.
  80.  */
  81. # define FREEBLOCK  -99
  82. typedef struct _ramblock RAMBLOCK;
  83. typedef struct _diskblock DISKBLOCK;
  84. struct _ramblock {
  85.     RAMBLOCK    *next;          /* For a linked list */
  86.     int     level;          /* Level stored or FREEBLOCK */
  87.     long        gtime;          /* The time stored */
  88.     struct  cel cell[MAXX * MAXY];  /* The storage */
  89. };
  90. struct _diskblock {
  91.     DISKBLOCK   *next;          /* For linked list */
  92.     int     level;          /* Level stored or FREEBLOCK */
  93.     long        gtime;          /* The time stored */
  94.     long        fpos;           /* The disk position */
  95. };
  96. extern RAMBLOCK *ramblks;
  97. extern DISKBLOCK *diskblks;
  98.  
  99. # endif MSDOS
  100.  
  101. # ifdef MSDOS
  102. #  define NULL 0L       /* For large model only */
  103. # else
  104. #  define NULL 0
  105. # endif MSDOS
  106. #define BUFBIG  4096            /* size of the output buffer */
  107. #define MAXIBUF 4096            /* size of the input buffer */
  108. #define LOGNAMESIZE 40          /* max size of the players name */
  109. #define PSNAMESIZE 40           /* max size of the process name */
  110. #define SAVEFILENAMESIZE 128    /* max size of the savefile path */
  111.